@import "./variables";

.#{$component-prefix}tabs {

  &--line {
    .#{$component-prefix}tabs__wrap {
      height: $tabs-wrap-height;
    }
  }
}

.#{$component-prefix}tabs__wrap {
  display: flex;
  overflow: hidden;

  &--page-top {
    position: fixed;
  }

  &--content-bottom {
    top: auto;
    bottom: 0;
  }

  &__scroll {

    &--line {
      box-sizing: content-box;
      width: 100%;
      height: 100%;
      background: #fff;
    }

    &--card {
      box-sizing: border-box;
      width: 100%;
      height: $tabs-card-height;
      margin: $tabs-card-margin;
      border: $tabs-card-border-width solid $tabs-card-border-color;
      border-radius: $tabs-card-border-radius;
    }

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &--scrollable {
    .#{$component-prefix}tabs__tab {
      flex: 1 0 auto;
      padding: 0 var(--padding-sm, $padding-sm);
    }
  }
}

.#{$component-prefix}tabs__nav {
  position: relative;
  display: flex;
  user-select: none;
  background: $tabs-nav-background-color;

  &--line {
    box-sizing: content-box;
    height: 100%;
    padding-bottom: 15px * $hd; /* 15px padding to hide scrollbar in mobile safari */
  }

  &--card {
    box-sizing: content-box;
    height: 100%;

    .#{$component-prefix}tabs__tab {
      color: $tabs-active-color;
      border-right: var(--border-width-base, $border-width-base) solid $tabs-active-color;

      &:last-child {
        border-right: 0 none;
      }

      &--active {
        color: var(--white, $white);
        background: $tabs-active-color;
      }

      &--disabled {
        color: $tab-disabled-color;
      }
    }
  }
}

